package site.sorghum.ddl.solon.entity;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.With;
import org.noear.wood.annotation.Column;
import org.noear.wood.annotation.PrimaryKey;
import org.noear.wood.annotation.Table;
import site.sorghum.ddl.annotation.DdlIndex;
import site.sorghum.ddl.annotation.DdlType;
import site.sorghum.ddl.annotation.DdlWeight;

import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Builder
@Table("solon_wood_bank_account_888")
public class BankAccount extends BaseId {
    @PrimaryKey
    @Column("long_id")
    String longId;
    @Column("number_j")
    @DdlWeight(weight = 800)
    String accountNumber;
    @Column("holder")
    String accountHolder;
    @With
    @Column("balance_3")
    BigDecimal balance;

    @DdlIndex(group = 2)
    @DdlType(value = "int", nullable = false)
    Integer sort;

    public enum AccountType {
        SAVINGS, CHECKING, CREDIT
    }
}